/**
 * @param {number[]} nums
 * @return {number}
 */
var sumOfUnique = function (nums) {
  let list = new Array(101).fill(0)
  for (let i = 0; i < nums.length; i++) {
    list[nums[i]]++
  }
  let sum = 0
  for (let i = 0; i < 101; i++) {
    if (list[i] === 1) {
      sum += i
    }
  }
  return sum
};

var nums = [1, 2, 3, 2]
console.log(sumOfUnique(nums))
